package sizeyunsuan;

/**
 * Created by 春旺 on 2017/5/14.
 */
import java.io.*;
public class Judge {
    public String judge(String answer,int tr, int su,int langue)throws IOException{
        FileReader  fr = new FileReader("answer.txt");
        BufferedReader re = new BufferedReader(fr);
        String answers = re.readLine();


        String a;
        if (answer.equals(answers) ) {
            if (langue ==1)
                System.out.println("正确");
            else if (langue== 2)
                System.out.println("正確");
            else
                System.out.println("TRUE");

            tr =  tr+1 ;
            su =su +1;

             a = tr + "/" + su;
             System.out.println(a);

        } else {
            if (langue ==1)
                System.out.println("错误     正确答案：" + answer);
            else if (langue== 2)
                System.out.println("錯誤   正確答案：" + answers);
            else
                System.out.println("FALSE   TRUE:" + answers);

            System.out.println();

            su =  su +1;

             a= tr + "/" +su ;
             System.out.println(a);
        }
     return a;
    }
    }

